package com.jsoft.dao.impl;

import com.jsoft.dao.TransferMessageDao;
import com.jsoft.entity.TransferMessage;
import com.jsoft.util.DAO;

import java.util.List;

/**
 * @author:sha
 * @email:o68o4741@163.com
 * @date:2023/2/18
 */
public class TransferMessageDaoImpl extends DAO<TransferMessage> implements TransferMessageDao {

    @Override
    public List<TransferMessage> listTransferMessage() throws Exception {
        String sql="select id, enterprise,social_uniform_code socialUniformCode,institution,amountmoney,open_time openTime,expiry_time expiryTime,payment_interest_type paymentInterestType,remark from transfermessage ";
        return getForList(sql);
    }

    @Override
    public TransferMessage getTransferMessage(Integer id) throws Exception {
        String sql="select id, enterprise,social_uniform_code socialUniformCode,institution,amountmoney,open_time openTime,expiry_time expiryTime,payment_interest_type paymentInterestType,remark from transfermessage where id = ?";
        return get(sql,id);
    }
}
